set scheme s1color

use repeated_cross_section, clear

// muslim indicator 
gen muslim=(paiperc=="06"|paiperc=="08")


local sample if pnai28=="10"  & female==1 
local var bacormore
collapse (mean) `var' `sample', by(birthyear muslim)

twoway line `var'  birthyear if muslim==1, lcolor(red) legend(label(1 "Muslim") label(2 "Non-Muslim")) ///
 ||  line `var'  birthyear if muslim==0, lcolor(blue) xline(1986, lcolor(gs10)) ///
 xtitle("Year of birth") ytitle("Completed secondary education")
